u = 10000;
a = 1e-8;

X = fn_u2X(u, a);
disp(X);
u2 = fn_X2u(X, a);
disp(u2);


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function X = fn_u2X(u, a)

X = -log((1+a*exp(-u))/(1+a));

end


function u = fn_X2u(X, a)

u = -log(1/a*(exp(-X)-1) + exp(-X));

end